home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: CommentBlk.bed 1.01 (01.04.96)
- **
- ** Comment out the selected block using ARexx comments
- ** (easily changed to C, Modula-2, Ada, or ASM comments)
- **
- ** Written by Chris Bailey
- ** Modified by Martin Taillefer
- ** Modified by Marco Negri
- ** Modified by Brian Jones
- */
-
- OPTIONS RESULTS
-
- /* For ARexx commenting */
- CommentStart = "/** "
- CommentMid = "**** "
- CommentEnd = "**/ "
-
- /*
- /* For C commenting */
- CommentStart = "// "
- CommentMid = "// "
- CommentEnd = "// "
-
- /* For Modula-2 or Pascal commenting */
- CommentStart = "(**** "
- CommentMid = " **** "
- CommentEnd = " ****)"
-
- /* For Ada commenting */
- CommentStart = "-- "
- CommentMid = "-- "
- CommentEnd = "-- "
-
- /* For ASM commenting */
- CommentStart = "** "
- CommentMid = "** "
- CommentEnd = "** "
- */
-
- GetBlkDims
- PARSE VAR RESULT mode . start . end
-
- IF mode = OFF THEN DO
- SetStatusBar "Error: No block marked!"
- END; ELSE DO
- MarkBlk
-
- Move start 1
- Text '"' || CommentStart || '\n"'
-
- RecordMacro QUIET
- MoveSOL
- Text '"' || CommentMid || '"'
- MoveDown
- EndMacro
-
- IF end-start > 0 THEN
- PlayMacro end - start
-
- MoveSOL
- Text '"' || CommentEnd || '\n"'
- END
-